package bingo.web.mvc.exception;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
 * Jan 21, 2009 12:34:36 PM
 * Author:yangdongyu(yangdy@bingosoft.net)
 * ReadMe:异常处理接口
 * ChangeLog:
 */
public interface IExceptionHandler {
	/**
	 * 处理RequestDispatherServlet在响应客户请求时出现的异常
	 * @param request
	 * @param response
	 * @param exeception
	 * @throws IOException 
	 * @throws ServletException 
	 */
	void processException(HttpServletRequest request,
			HttpServletResponse response, Exception exeception) throws ServletException, IOException;
	
	/**
	 * 保存异常,保存之后可以根据对应的key,在异常展现页面获取对应的异常进行展现
	 * @param request
	 * @param response
	 * @param exeception
	 */
	void saveException(HttpServletRequest request,
			HttpServletResponse response, Exception exeception);
	/**
	 * 获取异常的展现页面地址
	 * @param request
	 * @param response
	 * @param exeception
	 */
	String getExceptionPage(HttpServletRequest request,
			HttpServletResponse response, Exception exeception);
}